<!DOCTYPE html>
<html lang="en">
<head>

    <meta charset="UTF-8">
    <script type="text/javascript" src="assets/jwplayer.min.js"></script>
    <link type="text/css" rel="stylesheet" href="assets/style.css" />
    <title>Live captions</title>

</head>
<body>

<h2>Live captions</h2>

<div id="player"></div>
<script type="text/javascript">
    jwplayer("player").setup({
        file: 'myStream',
        height: 270,
        plugins: {
            '../captions.js': {}
        },
        flashplayer: 'assets/player.swf',
        width: 480,
        streamer: 'rtmp://184.72.239.149/cc'
    });
    jwplayer().onError(function(event){
        alert(event.message);
    });
</script>

<p>Here is an example live stream with inject closed captions.<br/>
The captions are inserted as onTextData events with only the <em>text</em> and <em>language</em> fields.
</p>


</body>
</html>